#pragma once

#include "Shader.h"
#include "Texture.h"

namespace Graphics
{
#ifdef DX_11
class TextureShader : public Graphics::Shader
{
	RTTI_DECLARATIONS(TextureShader, Graphics::Shader)

public:
	TextureShader(void);
	virtual ~TextureShader(void);
	virtual bool Initialize();
	virtual void Deinitialize();
	virtual bool Render(int indexCount, int instanceCount, D3DXMATRIX worldMatrix, D3DXMATRIX viewMatrix, D3DXMATRIX projectionMatrix, Texture* texture);
	virtual bool Render(int indexCount, int instanceCount, D3DXMATRIX worldMatrix, D3DXMATRIX viewMatrix, D3DXMATRIX projectionMatrix, ID3D11ShaderResourceView* texture);

private:
	virtual bool RenderShader(D3DDevice* device, int vertextCount, int instanceCount);
	
	bool InitializeShader(HWND winHandle, const char* vertexShaderName, const char*  pixelShaderName);
	void DeinitializeShader();
	bool SetShaderParameters(D3DXMATRIX worldMatrix, D3DXMATRIX viewMatrix, D3DXMATRIX projectionMatrix, Texture* texture);
	bool SetShaderParameters(D3DXMATRIX worldMatrix, D3DXMATRIX viewMatrix, D3DXMATRIX projectionMatrix, ID3D11ShaderResourceView* texture);
};
#elif defined( DX_9 )
class TextureShader : public Graphics::Shader
{
	RTTI_DECLARATIONS(TextureShader, Graphics::Shader)
public:
	TextureShader(void);
	virtual ~TextureShader(void);
};
#endif
}